import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 数据查询-流水报告信息 */
export interface DataQueryLsbg {
          id: number; // ID
          userId?: number; // 用户ID
          deptId?: number; // 部门ID
          dataId: number; // 数据ID
          queryTime?: string | Dayjs; // 查询时间
          url: string; // 流水报告地址
  }

// 数据查询-流水报告 API
export const DataQueryLsbgApi = {
  // 查询数据查询-流水报告分页
  getDataQueryLsbgPage: async (params: any) => {
    return await request.get({ url: `/business/data-query-lsbg/page`, params })
  },

  // 查询数据查询-流水报告详情
  getDataQueryLsbg: async (id: number) => {
    return await request.get({ url: `/business/data-query-lsbg/get?id=` + id })
  },

  // 新增数据查询-流水报告
  createDataQueryLsbg: async (data: DataQueryLsbg) => {
    return await request.post({ url: `/business/data-query-lsbg/create`, data })
  },

  // 修改数据查询-流水报告
  updateDataQueryLsbg: async (data: DataQueryLsbg) => {
    return await request.put({ url: `/business/data-query-lsbg/update`, data })
  },

  // 删除数据查询-流水报告
  deleteDataQueryLsbg: async (id: number) => {
    return await request.delete({ url: `/business/data-query-lsbg/delete?id=` + id })
  },

  /** 批量删除数据查询-流水报告 */
  deleteDataQueryLsbgList: async (ids: number[]) => {
    return await request.delete({ url: `/business/data-query-lsbg/delete-list?ids=${ids.join(',')}` })
  },

  // 导出数据查询-流水报告 Excel
  exportDataQueryLsbg: async (params) => {
    return await request.download({ url: `/business/data-query-lsbg/export-excel`, params })
  },
}